package com.fishbone.jwt.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @ClassName JwtProperties
 * @Author huyaxi
 * @DATE 2020/4/2 9:59
 */

@ConfigurationProperties(prefix= JwtProperties.JWT_PREFIX)
public class JwtProperties {
    static final String JWT_PREFIX= "jwt.config";
    /**
     * 是否可用
     */
    private boolean enabled;
    /**
     * jks 路径
     */
    private String keyLocation;
    /**
     * key alias
     */
    private String keyAlias;
    /**
     * key store pass
     */
    private String keyPass;
    /**
     * jwt签发者
     **/
    private String iss;
    /**
     * jwt所面向的用户
     **/
    private String sub;
    /**
     * access jwt token 有效时长
     */
    private Long accessExpTime;
    /**
     * refresh jwt token 有效时长
     */
    private Long refreshExpTime;

    public boolean isEnabled() {
        return enabled;
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }

    public String getKeyLocation() {
        return keyLocation;
    }

    public void setKeyLocation(String keyLocation) {
        this.keyLocation = keyLocation;
    }

    public String getKeyAlias() {
        return keyAlias;
    }

    public void setKeyAlias(String keyAlias) {
        this.keyAlias = keyAlias;
    }

    public String getKeyPass() {
        return keyPass;
    }

    public void setKeyPass(String keyPass) {
        this.keyPass = keyPass;
    }

    public String getIss() {
        return iss;
    }

    public void setIss(String iss) {
        this.iss = iss;
    }

    public String getSub() {
        return sub;
    }

    public void setSub(String sub) {
        this.sub = sub;
    }

    public Long getAccessExpTime() {
        return accessExpTime;
    }

    public void setAccessExpTime(Long accessExpTime) {
        this.accessExpTime = accessExpTime;
    }

    public Long getRefreshExpTime() {
        return refreshExpTime;
    }

    public void setRefreshExpTime(Long refreshExpTime) {
        this.refreshExpTime = refreshExpTime;
    }
}
